﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlServerCe;
using System.Data.SqlClient;

namespace Payroll
{
    public partial class PaiedLINQ : Form
    {
        
        
        public PaiedLINQ()
        {
            InitializeComponent();
        }

        private void PaiedLINQ_Load(object sender, EventArgs e)
        {
            this.dateTimePicker1.Format = DateTimePickerFormat.Custom;
            this.dateTimePicker1.CustomFormat = "yyyy-MM-dd";

            textBox1.Text = myLINQ.PaiedLINQ("","");
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            textBox1.Text = myLINQ.PaiedLINQ(comboBox1.Text, "");
            Console.WriteLine(Convert.ToString(dateTimePicker1.Value));
        }

        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            dateTimePicker1.CustomFormat = "yyyy-MM-dd";

            string time = dateTimePicker1.Value.ToString("yyyy-MM-dd");
            textBox1.Text = myLINQ.PaiedLINQ(comboBox1.Text, time);

            Console.WriteLine(Convert.ToString(time));

        }
    }
}
